defaults.js ➔ defaultDataSanitizer   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
import { sanitizePasswords, simpleSanitizer } from './utils/sanitizers';
2
3
function defaultDataSanitizer(data) {
4
    return simpleSanitizer(sanitizePasswords(data));
5
}
6
7
const defaultLevel = 'info';
8
const defaultErrorLevel = 'error';
9
10
const defaultMethodNameFilter = name => name !== 'constructor' && name.indexOf('_') !== 0;
11
12
export default {
13
    level            : defaultLevel,
14
    errorLevel       : defaultErrorLevel,
15
    paramsSanitizer  : defaultDataSanitizer,
16
    resultSanitizer  : defaultDataSanitizer,
17
    errorSanitizer   : simpleSanitizer,
18
    methodNameFilter : defaultMethodNameFilter,
19
    logger           : console
20
};
21
22